#include "Schedule.h"

Schedule::Schedule(void)
{
}

Schedule::Schedule(unsigned int id, QDateTime* startDate, QDateTime* endDate,Visit *visit, const QString &note)
{
	this->id = id;
	this->startDate = startDate;
	this->endDate = endDate;
	this->visit = visit;
	this->note = note;
}
Schedule::~Schedule(void)
{
	if(visit != NULL)
	{
		//delete visit;
		visit = NULL;
	}

	if(startDate != NULL)
	{
		//delete startDate;
		//startDate = NULL;
	}
	
	if(endDate != NULL)
	{
		//delete endDate;
		//endDate = NULL;
	}
}

unsigned int Schedule::getId()
{
	return id;
}

Visit* Schedule::getVisit()
{
	return this->visit;
}

QDateTime* Schedule::getStartDate()
{
	return this->startDate;
}

QDateTime* Schedule::getEndDate()
{
	return this->endDate;
}

QString Schedule::getNote()
{
	return this->note;
}

void Schedule::setId(unsigned int id)
{
	this->id = id;
}

void Schedule::setVisit(Visit* visit)
{
	this->visit = visit;
}

void Schedule::setNote(const QString& note)
{
	this->note = note;
}

void Schedule::setStartDate(QDateTime* date)
{
	this->startDate = date;
}

void Schedule::setEndDate(QDateTime *date)
{
	this->endDate = date;
}